package com.tencent.sr.iris.activity.interfaces.client.activity;

import com.tencent.sr.iris.activity.interfaces.request.IrisPaginationRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.FlowActivityInfoRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.GetJuniorTaskRecordListRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.ProcessUpdateLimitRequest;
import com.tencent.sr.iris.activity.interfaces.request.acticity.UserTaskRecordRequest;
import com.tencent.sr.iris.activity.interfaces.response.activity.FlowActivityInfoResponse;
import com.tencent.sr.iris.activity.interfaces.response.activity.UserTaskRecordResponse;
import com.tencent.sr.rmall.common.primitive.HttpResult;
import com.tencent.sr.rmall.common.response.PaginationResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "iris-activity-core-service", contextId = "UserTaskRecordClient",
        path = "/api/v1/iris/iris-activity-core-service/task/record")
public interface UserTaskRecordClient {

    @PostMapping("page")
    HttpResult<PaginationResponse<UserTaskRecordResponse>> page(
            @Validated @RequestBody IrisPaginationRequest<UserTaskRecordRequest> request);

    /**
     * 获取下级任务列表
     * @param request request
     * @return UserTaskRecordResponse
     */
    @PostMapping("getJuniorTaskRecordList")
    HttpResult<PaginationResponse<UserTaskRecordResponse>> getJuniorTaskRecordList(
            @Validated @RequestBody IrisPaginationRequest<GetJuniorTaskRecordListRequest> request);

    @PostMapping("queryFlowActivityInfo")
    HttpResult<FlowActivityInfoResponse> queryFlowActivityInfo(
            @Validated @RequestBody FlowActivityInfoRequest request);

    @PostMapping("processUpdateLimit")
    @ApiOperation(value = "调高pid的发奖上限处理流程", httpMethod = "POST")
    public HttpResult<String> processUpdateLimit(
            @Validated @RequestBody ProcessUpdateLimitRequest request);
}
